﻿<phone:PhoneApplicationPage 
    x:Class="demobackground.ScorePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Loaded="PhoneApplicationPage_Loaded"
    SupportedOrientations="Landscape" Orientation="Landscape"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="800"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->


        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.Background>
                <LinearGradientBrush>
                    <LinearGradientBrush.GradientStops>

                        <GradientStopCollection>
                            <GradientStop Offset="0.25" Color="Black"/>
                            <GradientStop Offset="1" Color="DarkBlue"/>
                        </GradientStopCollection>

                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Grid.Background>
            <ListBox x:Name="lbScore" Height="402" HorizontalAlignment="Left" Margin="111,72,0,0"  VerticalAlignment="Top" Width="587" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="5"  />
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            
                            <TextBlock VerticalAlignment="Center" Margin="0,10,0,10"  Grid.Column="1" Text="{Binding Path=TenNguoiChoi}" />
                            <TextBlock VerticalAlignment="Center" Grid.Column="2" Text="{Binding Path=Diem}" />
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
                
            </ListBox>
            <TextBlock Height="49" FontSize="40" HorizontalAlignment="Center" Margin="210,6,188,0" Name="textBlock1" Text="BẢNG XẾP HẠNG" VerticalAlignment="Top" >
                <TextBlock.Foreground>
                        <LinearGradientBrush>
                            <GradientStop x:Name="gradientStop1" 
                                          Offset="0" Color="Red" />
                            <GradientStop x:Name="gradientStop2" 
                                          Offset="1" Color="Blue" />
                        </LinearGradientBrush>
                    </TextBlock.Foreground>
            </TextBlock>
            <Image x:Name="imgGold" Source="Image/gold.png" Width="24" Height="36" Margin="45,78,635,0" VerticalAlignment="Top" />
            <Image x:Name="imgSilver" Height="36" Margin="45,124,635,0" Source="Image/silver.png" Width="24" VerticalAlignment="Top" />
            <Image x:Name="imgBronze" Height="36" Margin="45,0,635,275" Source="Image/bronze.png" Width="24" VerticalAlignment="Bottom" />
            <TextBlock Height="30" x:Name="txtConnection" HorizontalAlignment="Left" Margin="246,124,0,0"  Text="TextBlock" VerticalAlignment="Top" />
            <Grid.Triggers>
                <EventTrigger>
                    <BeginStoryboard>
                        <Storyboard>
                            <ColorAnimation Storyboard.TargetName="gradientStop1"
                                                Storyboard.TargetProperty="Color"
                                                From="Red" To="Blue" Duration="0:0:11"
                                                AutoReverse="True"
                                                RepeatBehavior="Forever" />

                            <ColorAnimation Storyboard.TargetName="gradientStop2"
                                                Storyboard.TargetProperty="Color"
                                                From="Blue" To="Red" Duration="0:0:13"
                                                AutoReverse="True"
                                                RepeatBehavior="Forever" />

                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Grid.Triggers>
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
